﻿using Grasshopper.Kernel.Types;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace D009_AdditionMenu
{
    public class GH_Human : GH_Goo<Human>
    {
        public override bool IsValid => true;

        public override string TypeName => "人";

        public override string TypeDescription => "一个人的参数";

        public GH_Human(GH_Human other) : base(other)
        {

        }

        public GH_Human()
        {
            Value = new Human();
        }

        public GH_Human(Human h)
        {
            if (h != null)
            {
                Value = h;
            }
            else
            {
                Value = new Human();
            }
        }

        public override IGH_Goo Duplicate()
        {
            return new GH_Human(this);
        }

        public override string ToString()
        {
            return $"性别：{Value.Gender}\n状态：{Value.State}\n婚姻：{Value.Married}";
        }
    }
}
